-- Author: shunguo.chen
-- Date: 2017-06-28 11:42:45
--
-- SettingController
--

local SettingView = import("..views.SettingView")

local fileName = string.getModeName(...)
local ClassRef = class(fileName, app.mvc.ControllerBase)

local SETTING_CONF = {
	{id=1, name=L("lua_code_text_470")},
	{id=2, name=L("lua_code_text_510")},
	{id=3, name=L("lua_code_text_203")}
}

function ClassRef:ctor(params)
	self.super.ctor(self, params)
	
end

function ClassRef:init()
	self._curId = 1
end

function ClassRef:removeListeners()
	self.super.removeListeners(self)
end

function ClassRef:listEvent()
    return {

	}
end

function ClassRef:onEvent(eventName, data)
	if eventName == "onPaySuccess" then

	end
end

-- data = 设置类型
-- 1	基础设置
-- 2	战斗设置
-- 3	im设置
function ClassRef:openView(data)
	if cc.isDead(self._view) then
		self._view = SettingView.new(app.mvc.VIEWTYPE_MODAL_BG, SETTING_CONF)
		self._view:onCloseView(handler(self, self.closeView))
		self._view:onClearView(handler(self, self.clearView))
	end
	self:addChild(self._view, data)
	self._view:show(data or 1)
end

------------------------------------------------------------

return ClassRef